Digital processing systems use heavily the type information of files (the type of files, or file types). For example, a user interface associates a type of files with an application program so that a standard user operation on one of the files starts the associated application program to operate on that file, such as a mouse click, or a double click on the icon of a file starts the associated program to open that file.
Many digital processing systems, such as machines running Windows OS (Windows machines) and the World Wide Web (the Web), rely heavily on the use of file extensions to store the type information of files. FIG. 1 shows a typical file name on a Windows machine or on the Web. A file name 12 has a filename 14 and an extension 16. For example, a file named “memo.doc” has a filename “memo” and an extension “.doc”. Other known extensions associated with other types of files include: “.xls”; “.nfs”; “.pdf”; “.ppt” and many others.
Some digital processing systems rely on their file systems to store the type information. For example, Mac OS, which runs on Macintosh computers, has traditionally relied on the ability of its proprietary file system (HFS/HFS+/AFP) to store the type information. When a file on a Mac is transferred to a Windows machine or the Web, the HFS metadata of the file is lost. The type information of the file is lost, since the Mac OS does not use extensions to store the type information. In order for such a system to interoperate well with Windows machines and the Web, it is desirable that it can also manage extensions.
FIG. 2 shows an example of a method for displaying file extensions in the prior art. The user is given a choice with respect to all files to see no extension, all extensions, or unknown extensions. The user's choice is saved as a preference in the system and applies to all files. The extensions of the files are either shown or hidden in the user interface, according to the user's preference and whether the extension of the file to be displayed is known to the system or not. The name of the file saved in memory 402 (e.g. hard drives, floppy diskettes, or other non-volatile memories) contains a filename and an extension. If the user's preference is found to show all extensions in operation 404, operation 406 displays a displayed name of the file in the user interface. The displayed name contains both the filename and the extension. If the user's preference is to show no extension, operation 408 displays a displayed name of the file. The displayed name does not contain the extension. If the user's preference is to show unknown extensions, operation 410 checks whether the extension of the file is known to the system or not. If the extension of the file is of an unknown type, operation 406 makes the extension visible in the user interface for all such files having unknown extensions; otherwise, operation 408 makes the extension invisible in the user interface. Thus, the visibility of the extension of the files in the system is controlled by a single parameter that stores the user's preference.
FIG. 3 shows a method for processing the inputs for the name of a file in the prior art. An input 302 may involve a user typing in a name for a file or downloading a file from another system over a network or copying a file from a storage device (e.g. a Zip disk). When it is determined that an input 302 is given to a newly created file (e.g. a file downloaded from another system over a network or copied from a storage device) in operation 304, then operation 306 follows and the input is taken as a file name that contains a filename and an extension. When it is determined that the new name is given to replace the original name of the file in operation 304, operation 308, following the procedure in FIG. 2, checks if the extension of all the files with this extension are currently visible or not in the user interface according to a setting that reflects the user's preference. This setting is for all files, and is not individually selectable for each file. If the extension of the file is visible in the user interface, operation 306 replaces the filename and the extension of the file with those in the input 302. If the extension of the file is invisible in the user interface, operation 310 replaces the filename of the file with the input. In this case if the new input contains an extension, the filename of the file is renamed to have that extension, while the extension of file remains unchanged.
While these prior methods and systems give a user certain degrees of control over the visibility of the file extensions in the user interface, these systems and methods are prone to certain problems. For example, on a system that uses the method shown in FIG. 2, the user cannot selectively make the extensions of some of the files visible, while making the extensions of the other files with the same extensions invisible. If the user chooses to hide all extensions, a file named according to the date, “11.9.00”, appears as “11.9” in the user interface. If a new file is given the name “image.jpeg”, it is displayed as “image” in the user interface. It is not shown as what the user types. If a user changes the displayed name of the file to “image.jpeg” in the user interface, the name of the file is actually changed to “image.jpeg.jpeg”, which has a second extension, according to the method in FIG. 3.
If the user chooses to show all extensions, extensions are shown everywhere, even if the user does not want them or understand what they mean. If the user renames a file “image.jpeg” to “image” in the user interface, the name of the file is changed to “image”, which no longer has an extension, when the method in FIG. 3 is used. The type information stored in the extension of the file is lost. The user may not be able to open this file.
If the user chooses to show only unknown extensions, a file named “11.9.00” will be appropriately shown in the user interface as “11.9.00”, since “0.00” is not a known extension. However, “.mp3” is a known extension. The user cannot see the extension of the file “sound.mp3”, even if the user is interested in seeing it. If the user renames the displayed name in the user interface to “sound.mp3”, the file is actually named to “sound.mp3.mp3” according to the method in FIG. 3.
Thus, it is desirable to have a user-friendly method to manage the extensions of the files.